$(function() {
    var logTable = null;
    var opts = {
        targetId: "logTable",
        templateId: "tablelog",
        settings: {
            url: DI.queryOptLog,
            ajaxType: "json",
            sourceInterface: {
                INum: "total",
                IData: "rows"
            },
            paginationIndexName: {
                "peerpageRows": "pageLimit",
                "currentPage": "pageNo"
            }
        }

    };
    logTable = SwiftUI.swiftTable.getInstance(opts);

    var mainCtrl = avalon.define({
        $id: "mainController",
        taskNo: "",
        startTime: "",
        endTime: "",
        search: function() {
            var searchParam = {
                "taskNo": mainCtrl.taskNo,
                "startTime": mainCtrl.startTime,
                "endTime": mainCtrl.endTime
            }
            logTable.search(searchParam);
        },
    });

    PLATFORM.timepickerRange("#starttime", "#endtime");
    avalon.scan();
});